/*
 * Copyright 2013, Andrew Lindesay
 * Distributed under the terms of the MIT License.
 */

package org.haikuos.haikudepotserver.api1;

import com.googlecode.jsonrpc4j.JsonRpcService;
import org.haikuos.haikudepotserver.api1.model.captcha.GenerateCaptchaRequest;
import org.haikuos.haikudepotserver.api1.model.captcha.GenerateCaptchaResult;

/**
 * <p>This API is to do with captchas.  A captcha is a small image that is shown to a user in order for the user to
 * supply some textual response from the image in order to verify that the operator is likely to be human and not a
 * computer.  This helps to prevent machine-hacking of systems.  This API is able to provide a captcha and other
 * APIs require that a 'captcha response' is supplied as part of a request.  In general a captcha is valid for a
 * certain length of time.</p>
 */

@JsonRpcService("/api/v1/captcha")
public interface CaptchaApi {

    /**
     * <p>This method will return a captcha that can be used in systems where a captcha response (generated by a
     * human) is required to be supplied with an API request.</p>
     */

    GenerateCaptchaResult generateCaptcha(GenerateCaptchaRequest generateCaptchaRequest);

}
